<?php

namespace Application\Model\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Task
 *
 * @ORM\Table(name="task", indexes={@ORM\Index(name="fk_Tasks_Projecs1_idx", columns={"Projects_Id"})})
 * @ORM\Entity
 */
class Task
{
    /**
     * @var integer
     *
     * @ORM\Column(name="Id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="Description", type="string", length=45, nullable=true)
     */
    private $description;

    /**
     * @var boolean
     *
     * @ORM\Column(name="Complete", type="boolean", nullable=true)
     */
    private $complete;

    /**
     * @var string
     *
     * @ORM\Column(name="NeededExperience", type="string", length=45, nullable=true)
     */
    private $neededexperience;

    /**
     * @var \Application\Model\Entity\Project
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\Project")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Projects_Id", referencedColumnName="Id")
     * })
     */
    private $projects;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Application\Model\Entity\Image", mappedBy="tasks")
     */
    private $images;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Application\Model\Entity\Linktofile", mappedBy="tasks")
     */
    private $linkstofiles;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->images = new \Doctrine\Common\Collections\ArrayCollection();
        $this->linkstofiles = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Task
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set complete
     *
     * @param boolean $complete
     * @return Task
     */
    public function setComplete($complete)
    {
        $this->complete = $complete;

        return $this;
    }

    /**
     * Get complete
     *
     * @return boolean 
     */
    public function getComplete()
    {
        return $this->complete;
    }

    /**
     * Set neededexperience
     *
     * @param string $neededexperience
     * @return Task
     */
    public function setNeededexperience($neededexperience)
    {
        $this->neededexperience = $neededexperience;

        return $this;
    }

    /**
     * Get neededexperience
     *
     * @return string 
     */
    public function getNeededexperience()
    {
        return $this->neededexperience;
    }

    /**
     * Set projects
     *
     * @param \Application\Model\Entity\Project $projects
     * @return Task
     */
    public function setProjects(\Application\Model\Entity\Project $projects = null)
    {
        $this->projects = $projects;

        return $this;
    }

    /**
     * Get projects
     *
     * @return \Application\Model\Entity\Project 
     */
    public function getProjects()
    {
        return $this->projects;
    }

    /**
     * Add images
     *
     * @param \Application\Model\Entity\Image $images
     * @return Task
     */
    public function addImage(\Application\Model\Entity\Image $images)
    {
        $this->images[] = $images;

        return $this;
    }

    /**
     * Remove images
     *
     * @param \Application\Model\Entity\Image $images
     */
    public function removeImage(\Application\Model\Entity\Image $images)
    {
        $this->images->removeElement($images);
    }

    /**
     * Get images
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getImages()
    {
        return $this->images;
    }

    /**
     * Add linkstofiles
     *
     * @param \Application\Model\Entity\Linktofile $linkstofiles
     * @return Task
     */
    public function addLinkstofile(\Application\Model\Entity\Linktofile $linkstofiles)
    {
        $this->linkstofiles[] = $linkstofiles;

        return $this;
    }

    /**
     * Remove linkstofiles
     *
     * @param \Application\Model\Entity\Linktofile $linkstofiles
     */
    public function removeLinkstofile(\Application\Model\Entity\Linktofile $linkstofiles)
    {
        $this->linkstofiles->removeElement($linkstofiles);
    }

    /**
     * Get linkstofiles
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLinkstofiles()
    {
        return $this->linkstofiles;
    }
}
